The present invention relates generally to analog to digital conversion and control systems and more particularly to programmable, configurable analog to digital conversion within a controller area network.
Message-based networks are used in a variety of control networks. In a message-based network, all nodes within the network are connected to a common bus. Each node is also connected to peripheral devices and performs one or more functions. The functions may be, for example: monitoring conditions of peripheral devices, such as their electrical outputs, temperature, position or velocity; controlling and stimulating inputs to the peripheral devices; transmitting data messages concerning the peripheral devices over the common bus; and requesting data from other nodes over the common bus.
In a message-based network, messages are transmitted to all nodes in the network. Each node must then determine whether to accept and process a message or ignore the message. This is different from an address based network in which messages may be transmitted to a specific node based on the address of that node. The message-based communication between the nodes allows coordinated control of many control nodes within the system. Message types conventionally include data messages, remote data request messages, error messages and overload error messages.
Message-based networks are implemented in a wide variety of applications, including industrial automation, automotive/truck, medical equipment, test equipment and mobile machines. It will be appreciated that many of these networks are complex and require numerous nodes in order to control the numerous peripheral devices required to implement a system. For example, in an automobile application, hundreds of nodes may be required to monitor and control the engine, safety systems, security systems, sensors, signals, lights, buttons, electric motors, radio and other peripherals. For this reason, it is desirable to minimize the cost of each node.
Conventionally, it has been expensive to implement nodes in message-based networks. The expense has limited the range of applications to which message-based networks would otherwise be applied. The reasons for the high cost per node include that conventionally, relatively expensive devices such as microcontrollers are used to connect peripheral devices to the common bus. These devices often have much more processing capability than is required to control or monitor the peripheral devices.
There is a need for a new device for use in nodes of message-based networks. The device should be configurable allowing it to be implemented in a wide variety of applications to keep per unit costs of production low. There is still a further need for a device that includes an analog to digital converter (A/D) for converting analog inputs to digital values for transmission to the common bus. There is still a further need for a technique to minimize transmission of data messages carrying converted analog signal data. This is necessary to avoid congestion on a common message-based bus. There is still a further need for an A/D conversion module that makes efficient use of space and power on a device.
According to the present invention, an A/D conversion on a device is accomplished using fewer A/D conversion circuits than analog input channels. Signals from many analog input channels are time multiplexed and provided as a single input signal to each A/D conversion circuit. This avoids having to provide a dedicated A/D conversion circuit to each analog input channel on a device and therefore saves power and space on the device.
According to an embodiment of the present invention, a device automatically converts a plurality of analog input channels using a single analog to digital conversion circuit. The device includes a multiplexer, an analog to digital conversion circuit and a configurable channel controller. The multiplexer has at least two analog input channels. The multiplexer also has control inputs and an output. The analog to digital conversion circuit has inputs coupled to the output of the multiplexer and a clock signal. The analog to digital conversion circuit outputs a conversion value based on a voltage associated with the output of the multiplexer in successive clock cycles. The configurable channel controller outputs a control signal to the control inputs of the multiplexer to automatically select successive ones of the analog input channels for conveying to the analog to digital conversion circuit.
The configurable channel controller may have a configuration set based on values stored in one or more registers. The configuration may also include enable values that selectively enable each of the analog input channels for auto-conversion based on some of the values. In another embodiment, the configurable channel controller receives an interrupt signal to initiate outputting the control signal. In still another embodiment, the conversion value is output in successive clock cycles to registers where each register stores the converted value corresponding to the selected analog input channel. In still another embodiment, the device also includes comparators for comparing the converted value with a threshold value and a protocol engine for outputting a message when the converted value crosses the threshold value.
A method of automatic A/D conversion according to an embodiment of the present invention includes providing at least two analog input channels and periodically, successively selecting one of the analog input channels. A signal from the selected analog input channel is applied to an A/D conversion unit. The signal is then converted to a converted digital value. In one embodiment, a configuration stored in registers includes a period value corresponding to a period of the input channel selection. In another embodiment, each analog input channel may be enabled for periodic input channel selection based on enable values of the configuration. In still another embodiment, an interrupt signal initiates the periodic input channel selection. The method may also include storing the converted value and outputting the converted value to registers in successive clock cycles where each register stores the converted value corresponding to the selected analog input channel. In still another embodiment, the method further includes comparing the converted value with a threshold value and outputting a message over a message-based bus when the converted value crosses the threshold value.
The device and method according to the present invention may be incorporated within a cost effective node for connecting to a message-based bus. The configuration of the device and method may be set to a default configuration and then reconfigured on the fly via messages from the message-based bus. Using these features, it is possible to create xe2x80x98standardxe2x80x99 nodes that self configure on power up. The standard nodes can then be modified via the message-based bus as needed. These standard nodes can be mass produced and embodied in simple, cost effective devices thus significantly expanding the range of systems in which message-based networks such as the controller area network (CAN) can be implemented.